package com.liusand.entity.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author :liusha
 * packageName :com.liusand.entity.vo
 * fileName :Result
 * creationTime :2022/12/10 20:30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private Integer code;
    private String message;
    private Object data;

    public static Result error(String message){
        return new Result(0, message, null);
    }

    public static Result success(Object o){
        return new Result(200, "OK", o);
    }

    public static Result success() {
        return new Result(200, "OK", null);
    }


}
